package com.yunqiao.service.api.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 消息
 *
 * @author Crocutax
 * @email wangxw725@163.com
 * @date 2019-03-03 21:58:45
 */
@TableName("tb_message")
@Data
@ApiModel(value = "消息对象")
public class MessageEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId
    @ApiModelProperty(value = "",hidden = true)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    private Long userId;

    /**
     * 收消息用户id
     */
    @ApiModelProperty(value = "收消息用户id")
    private Long targetUserId;

    /**
     * 订单id
     */
    @ApiModelProperty(value = "订单id")
    private Long orderId;

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    private String title;
    /**
     * 内容
     */
    @ApiModelProperty(value = "内容")
    private String content;

    /**
     * 是否读取 1：未读，2：已读
     */
    @ApiModelProperty(value = "是否读取 1：未读，2：已读")
    private Integer isRead;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间",hidden = true)
    private Date createTime;
    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间",hidden = true)
    private Date updateTime;
    /**
     * 软删除
     */
    @TableLogic
    @JsonIgnore
    @ApiModelProperty(value = "软删除", hidden = true)
    private Integer deleted;

}
